package com.aier.bean.report;

import com.aier.bean.common.CommonCode;
import com.aier.bean.common.FieldDescription;
import com.aier.bean.foreign.ForeignBase;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.VerticalAlignment;

import java.math.BigDecimal;

/**
 * 报价报表
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@ContentRowHeight(25)
@ColumnWidth(15)
@HeadStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
public class Quotation extends ForeignBase {

    public Quotation(ForeignBase foreignBase){
        this.setFbaCode(foreignBase.getFbaCode());
        this.setTrackingNumber(foreignBase.getTrackingNumber());
        this.setWarehouseCode(foreignBase.getWarehouseCode());
        this.setAsin(foreignBase.getAsin());
        this.setSku(foreignBase.getSku());
        this.setPicture(foreignBase.getPicture());
        this.setBoxNum(foreignBase.getBoxNum());
        this.setPerBoxQty(foreignBase.getPerBoxQty());
        this.setBoxLength(foreignBase.getBoxLength());
        this.setBoxWidth(foreignBase.getBoxWidth());
        this.setBoxHeight(foreignBase.getBoxHeight());
        this.setWeight(foreignBase.getWeight());
        this.setBuildDate(foreignBase.getBuildDate());
        this.setStaffId(foreignBase.getStaffId());
        this.setStaffName(foreignBase.getStaffName());
        this.setPlatforms(CommonCode.platformsCode.get(foreignBase.getPlatforms()));
        this.setCountry(CommonCode.countryCode.get(foreignBase.getCountry()));
    }

    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    @ExcelProperty(value = "总重量(Kg)",index = 17)
    @FieldDescription("总重量(Kg)")
    BigDecimal totalWeight;

    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    @ExcelProperty(value = "单箱方数",index = 18)
    @FieldDescription("单箱方数")
    BigDecimal singleBoxVolumetric;

    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    @ExcelProperty(value = "总方数",index = 19)
    @FieldDescription("总方数")
    BigDecimal totalVolumetric;

    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    @ExcelProperty(value = "体积重",index = 20)
    @FieldDescription("体积重")
    private BigDecimal volumetricWeight;

    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    @ExcelProperty(value = "申报单价($)", index = 21)
    @FieldDescription("申报单价($)")
    private BigDecimal declaredUnitPrice;

    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    @ExcelProperty(value = {"关税(￥)"}, index = 22)
    @FieldDescription("关税(￥)")
    private BigDecimal tariffs;

    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    @ExcelProperty(value = {"恒达","包税价(￥/kg)"}, index = 23)
    @FieldDescription("包税价(￥/kg)")
    private BigDecimal hengdaTaxInclusivePrice;

    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    @ExcelProperty(value = {"恒达","自税价格(￥/方)"}, index = 24)
    @FieldDescription("自税价格(￥/方)")
    private BigDecimal hengdaSelfTaxedPrice;

    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    @ExcelProperty(value = {"恒达","渠道"}, index = 25)
    @FieldDescription("渠道")
    private String hengdaTransportChannel;

    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    @ExcelProperty(value = {"恒达","包税总价"}, index = 26)
    @FieldDescription("包税总价")
    private BigDecimal hengdaTotalTaxInclusivePrice;

    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    @ExcelProperty(value = {"恒达","自税总价"}, index = 27)
    @FieldDescription("自税总价")
    private BigDecimal hengdaTotalSelfTaxedPrice;


    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    @ExcelProperty(value = {"恒达","运费+自税总价"}, index = 28)
    @FieldDescription("运费+自税总价")
    private BigDecimal hengdaTotalFee;

    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    @ExcelProperty(value = {"志业","包税价(￥/kg)"}, index = 29)
    @FieldDescription("包税价(￥/kg)")
    private BigDecimal zhiyeTaxInclusivePrice;

    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    @ExcelProperty(value = {"志业","自税价格(￥/方)"}, index = 30)
    @FieldDescription("自税价格(￥/方)")
    private BigDecimal zhiyeSelfTaxedPrice;


    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    @ExcelProperty(value = {"志业","渠道"}, index = 31)
    @FieldDescription("渠道")
    private String zhiyeTransportChannel;

    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    @ExcelProperty(value = {"志业","包税总价"}, index = 32)
    @FieldDescription("包税总价")
    private BigDecimal zhiyeTotalTaxInclusivePrice;

    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    @ExcelProperty(value = {"志业","自税总价"}, index = 33)
    @FieldDescription("自税总价")
    private BigDecimal zhiyeTotalSelfTaxedPrice;

    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    @ExcelProperty(value = {"志业","运费+自税总价"}, index = 34)
    @FieldDescription("运费+自税总价")
    private BigDecimal zhiyeTotalFee;

    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    @ExcelProperty(value = {"迈壹","包税价(￥/kg)"}, index = 35)
    @FieldDescription("包税价(￥/kg)")
    private BigDecimal maiyiTaxInclusivePrice;

    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    @ExcelProperty(value = {"迈壹","自税价格(￥/方)"}, index = 36)
    @FieldDescription("自税价格(￥/方)")
    private BigDecimal maiyiSelfTaxedPrice;


    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    @ExcelProperty(value = {"迈壹","渠道"}, index = 37)
    @FieldDescription("渠道")
    private String maiyiTransportChannel;

    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    @ExcelProperty(value = {"迈壹","包税总价"}, index = 38)
    @FieldDescription("包税总价")
    private BigDecimal maiyiTotalTaxInclusivePrice;

    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    @ExcelProperty(value = {"迈壹","自税总价"}, index = 39)
    @FieldDescription("自税总价")
    private BigDecimal maiyiTotalSelfTaxedPrice;

    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    @ExcelProperty(value = {"迈壹","运费+自税总价"}, index = 40)
    @FieldDescription("运费+自税总价")
    private BigDecimal maiyiTotalFee;

    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    @ExcelProperty(value = {"纽酷","包税价(￥/kg)"}, index = 41)
    @FieldDescription("包税价(￥/kg)")
    private BigDecimal niukuTaxInclusivePrice;

    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    @ExcelProperty(value = {"纽酷","自税价格(￥/方)"}, index = 42)
    @FieldDescription("自税价格(￥/方)")
    private BigDecimal niukuSelfTaxedPrice;

    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    @ExcelProperty(value = {"纽酷","渠道"}, index = 43)
    @FieldDescription("渠道")
    private String niukuTransportChannel;

    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    @ExcelProperty(value = {"纽酷","包税总价"}, index = 44)
    @FieldDescription("包税总价")
    private BigDecimal niukuTotalTaxInclusivePrice;

    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    @ExcelProperty(value = {"纽酷","自税总价"}, index = 45)
    @FieldDescription("自税总价")
    private BigDecimal niukuTotalSelfTaxedPrice;

    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    @ExcelProperty(value = {"纽酷","运费+自税总价"}, index = 46)
    @FieldDescription("运费+自税总价")
    private BigDecimal niukuTotalFee;
}
